#include <iostream>
using namespace std;
int n, arr[10010];
int main() {
	cin >> n;
	for(int i = 1; i <= n; i++)
		cin >> a[i];
    for (int i = 1; i < n; i++) {
        int key = arr[i];    
        int j = i - 1;    
        
        while (j >= 0 && arr[j] > key) {
            arr[j + 1] = arr[j];
            j--;                
        }
        arr[j + 1] = key;
    }
    for (int i = 0; i < size; i++)
        cout << arr[i] << " ";
    cout << endl;
    return 0;
}
